package com.dm.cloud.images.service;

import com.dm.cloud.images.common.po.ImagesContainer;
import com.dm.cloud.tkmybatis.service.BaseEntityService;
import com.dm.cloud.images.common.request.ImagesContainerSearchRequest;

import java.util.List;

/**
   * @author hcx
   * @type ImagesContainerService.java
   * @desc ImagesContainer service
   */
public interface ImagesContainerService extends BaseEntityService<ImagesContainerSearchRequest,ImagesContainer> {

    /**
     * 查询节点容器配置信息
     * @param nodeId
     * @param containerId
     * @return
     */
    ImagesContainer findImageContaniner(String nodeId, String containerId);

    /**
     * 删除
     * @param containerId 容器ID
     * @param nodeId 节点ID
     * @return
     */
    boolean deleteByNodeIdAndImagesId(String containerId, String nodeId);

    /**
     * 查询应用的所有
     * @param appCode
     * @return
     */
    List<ImagesContainer> findByAppCode(String appCode);

    /**
     * 将数据的appCode置空
     * @param nodeId
     * @param containerId
     */
    void clearContanierAppCode(String nodeId, String containerId);
}
